package com.mes.cloud.quartz;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * @Description TODO
 * @author: wxm
 * @date: 2019/6/11 12:38
 * @version: 1.0
 */
@Component
public class QuatrzPluginStarted implements ApplicationRunner {
    /**
     * 日志记录
     */
    private static final Logger LOGGER = LoggerFactory.getLogger(QuatrzPluginStarted.class);

    @Autowired
    private QuartzPlugin quartzPlugin;

    @Override
    public void run(ApplicationArguments applicationArguments) throws Exception {
        LOGGER.info("QuartzPlugin start.....");
        //启动定时器
        quartzPlugin.start();
    }
}
